/*---------------------------------------------------------------------*/
/* --- STC MCU Limited ------------------------------------------------*/
/* --- STC 1T Series MCU Demo Programme -------------------------------*/
/* --- Mobile: (86)13922805190 ----------------------------------------*/
/* --- Fax: 86-0513-55012956,55012947,55012969 ------------------------*/
/* --- Tel: 86-0513-55012928,55012929,55012966 ------------------------*/
/* --- Web: www.STCMCU.com --------------------------------------------*/
/* --- Web: www.STCMCUDATA.com  ---------------------------------------*/
/* --- QQ:  800003751 -------------------------------------------------*/
/* ���Ҫ�ڳ�����ʹ�ô˴���,���ڳ�����ע��ʹ����STC�����ϼ�����            */
/*---------------------------------------------------------------------*/

#include	"config.h"
#include	"System_init.h"
#include	"Task.h"
#include	"dc_motor.h"
#include	"STC8G_H_GPIO.h"
#include 	"STC8G_H_Delay.h"
#include    "STC8G_PCA.h"
#include	"STC8xxxx.H"

//========================================================================
// ����: void	main(void)
// ����: ����������.
// ����: None.
// ����: None.
// �汾: V1.0, 2012-10-22
//========================================================================
void main(void)
{
	SYS_Init();
	P33 = 0;
	P5 = 0xff;
	P3_MODE_OUT_PP(GPIO_Pin_3);
	P3_DRIVE_MEDIUM(GPIO_Pin_3);
	P3_SPEED_LOW(GPIO_Pin_3);

	CR = 0;
	CH = 0;
	CL = 0;
	ConfigPCA();
	CCAPM1 = 0x42;
	SetPWMFreq(Sysclk_1K);
	SetMotor1024(256);
	CR = 1;
	ConfigKeys();
	while (1);
}
